
<?php
    /*$param = $_GET['type'];*/
    $xp = new XsltProcessor();
    // create a DOM document and load the XSL stylesheet
    $xsl = new DomDocument;
    $xsl->load('Competences.xsl');

    //import the XSL styelsheet into the XSLT process
    $xp->importStylesheet($xsl);
    // create a DOM document and load the XML datat
    $xml_doc = new DomDocument;
    $xml_doc->load('../xml/Competences.xml');
    if (isset($_GET['type'])){
      $xp->setParameter('','type',$_GET['type']);
    }
  
    // transform the XML into HTML using the XSL file
    if ($html = $xp->transformToXML($xml_doc)) {
      print $html;
    } else {
      trigger_error('XSL transformation failed.', E_USER_ERROR);
    } // if
?>
